<?php
/*
 * Created on 2012-2-29
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
include("../../nncms_manager_inc.php");
include $nncms_config_path. "nn_cms_manager/controls/nncms_controls_check_login.php";
//导入语言包
if (isset($_SESSION["language_dir"])){
	$language_dir=$_SESSION["language_dir"];
}
include $nncms_config_path. "nn_cms_manager/languages/". $language_dir. "/language.php";

//加载多语言
include_once($nncms_config_path.'nn_cms_config/nn_cms_global.php');
include_once($nncms_config_path.'nn_cms_manager/nncms_mlang.php');

//获取权限检查类
include $nncms_db_path. "nns_pri/nns_db_pri_class.php";
$checkpri=new nns_db_pri_class();
$nns_id=$_GET["nns_id"];
$sp_id=$_GET["sp_id"];
$pri_bool=false;
$pri_bool = $checkpri -> nns_db_pri_check($_SESSION["nns_role_pris"], "135008");
$checkpri = null;
if (!$pri_bool) Header("Location: ../nncms_content_wrong.php");
//加载多语言
include_once($nncms_config_path.'nn_cms_config/nn_cms_global.php');
include_once($nncms_config_path.'nn_cms_manager/nncms_mlang.php');
include ($nncms_config_path. "nn_cms_config/nn_cms_global.php");
require_once $nncms_config_path . "nn_cms_config/nn_cms_global.php";
include_once $nncms_config_path . 'mgtv/mgtv_init.php';
$re = index_img_model::get_info($nns_id);

if($_POST&&!empty($_FILES)){
	$re = index_img_model::edit($_POST,$_FILES);
	Header("Location: nncms_mgtv_index_edit.php?sp_id=$sp_id&nns_id=$nns_id");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../css/allstyle.css" rel="stylesheet" type="text/css" />
<link href="../../css/rightframestyle.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../../js/jquery-1.4.3.min.js"></script>
<script language="javascript" src="../../js/table.js.php"></script>
<script language="javascript" src="../../js/radiolist.js"></script>
<script language="javascript" src="../../js/checkinput.js.php"></script>
<script language="javascript">

</script>
</head>

<body>



<div class="content">
	<div class="content_position">添加首页海报</div>
	<form id="add_form" action="" method="post" enctype="multipart/form-data">	
	<div class="content_table">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tbody>
            <tr>
				<td class="rightstyle">名称:</td>
				<td><?php echo $re['nns_name'];?><input type="hidden" name="action" value="edit"/><input type="hidden" name="nns_id" value="<?php echo $re['nns_id'];?>"/></td>
			</tr>
			<tr>
				<td class="rightstyle">首页海报:</td>
				<td><input type="file" name="nns_img" /><br/>
					<?php
					if($re['nns_img']){
						?>
						<img src="../../../data/downimg/<?php echo $re['nns_img'];?>" />
						<?php
					}
					?>
				</td>
			</tr>
			<tr>
				<td class="rightstyle"></td>
				<td><input type="submit"  value="上传"/></td>
			</tr>		
		  </tbody>
		</table>
	</div>
	</form>
	<div class="controlbtns">
		<div class="controlbtn <?php echo $action;?>"><a href="javascript:checkForm('<?php echo cms_get_lang('xtgl_jtgl');?>','<?php echo cms_get_lang('webkz_qrccxg'); ?>',$('#add_form'),'<?php echo $action; ?>');"><?php echo $action_str; ?></a></div>
		<div class="controlbtn back"><a href="javascript:returnToHistory();"><?php echo cms_get_lang('back');?></a></div>
		<div style="clear:both;"></div>
	</div>
</div>


</body>
</html>
